<?php
include_once(dirname(__FILE__).'/../domain/Booking.php');
class testBooking extends UnitTestCase {
      function testBookingModule() {
         $b = new Booking("11-02-07","Meghan2077291234","Tiny",
                  array("Meghan:mother", "Jean:father", "Teeny:sibling"),
                  array(),"Millie2073631234","Maine Med");
         
         $this->assertTrue($b->get_id() == "11-02-07Meghan2077291234");
         $this->assertEqual($b->get_date_in(),"11-02-07");
         $this->assertEqual($b->get_guest_id(),"Meghan2077291234");
         $this->assertEqual($b->get_status(),"pending");
         $this->assertEqual($b->get_room_no(),null);
         $this->assertEqual($b->get_patient(),"Tiny");
         $occ = $b->get_occupants();
         $this->assertTrue(in_array("Jean:father",$occ));
         $this->assertEqual($b->get_linked_room(),null);
         $this->assertEqual($b->get_date_out(),null);
         $this->assertEqual($b->get_referred_by(),"Millie2073631234");
         $this->assertEqual($b->get_hospital(),"Maine Med");
         $this->assertEqual($b->get_department(),null);
         $this->assertEqual($b->get_diagnosis(),null);
         $this->assertEqual($b->get_mgr_notes(),null);
         
         $b->add_occupant("Jordan","brother");
         $this->assertEqual(sizeof($b->get_occupants()), 4);
         $b->remove_occupant("Jordan");
         $this->assertEqual(sizeof($b->get_occupants()), 3);
         
      	echo ("testBooking complete");
  	  }
}

?>
